home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / mac / raytrace / rayshade / ryshdmst.hqx / Rayshade / dice.ray < prev    next >
Encoding:
Text File  |  1992-03-24  |  1.3 KB  |  69 lines

  1. /*
  2. ** A pair of dice on a wooden background.
  3. ** Jeremy Huxtable 11 Sep 1991
  4. */
  5. eyep 0 50 15 
  6. screen 200 200
  7. light 0.8 point -15 20 15
  8. light 0.5 point -15 -6 10
  9.  
  10. surface brown
  11.     ambient .5 .1 .1
  12.     diffuse .8 .39 .05
  13.     specular .18 .29 .05
  14.     specpow 10
  15.  
  16. surface blue
  17.     ambient .1 .1 .3
  18.     diffuse .3 .7 .8
  19.     specular .3 .4 .7
  20.     specpow 3
  21.     reflect 0.4
  22.  
  23. surface white
  24.     ambient .02 .02 .02
  25.     diffuse .8 .5 .3
  26.     specular .5 .4 .4
  27.  
  28. background .3 .3 .7
  29.  
  30. /* Define a cube with the corners shaved off */
  31. name cube
  32. intersect
  33.     box -0.5 -0.5 -0.5 0.5 0.5 0.5
  34.     sphere 0.8 0 0 0
  35. end
  36.  
  37. /* A single spot */
  38. name dieSpot
  39.     sphere 0.1 0 0 0
  40.  
  41. name spots
  42. list
  43.     /* The 1 face */
  44.     object dieSpot translate 0 -.5 0
  45.  
  46.     /* The 2 face */
  47.     object dieSpot translate .3 .3 .5
  48.     object dieSpot translate -.3 -.3 .5
  49.  
  50.     /* The 3 face */
  51.     object dieSpot translate .5 0 0
  52.     object dieSpot translate .5 .3 .3
  53.     object dieSpot translate .5 -.3 -.3
  54. end
  55.  
  56. /*
  57. ** A complete die. Note that we subtract the spots from the cube to give indented spots
  58. ** and that this fortuitously gives us the spot surface in the indentations.
  59. */
  60. name dice
  61. difference
  62.     object blue cube
  63.     object white spots
  64. end
  65.  
  66. object dice scale 10 10 10 rotate 0 0 1 120 translate -7 -1 0
  67. object dice scale 10 10 10 rotate 0 0 1 100 translate 10 2 0
  68. plane brown 0. 0. -5 0 0 1 texture wood scale 1 1 3
  69.